package com.bcqn.service;

import com.bcqn.model.PostReview;
import com.bcqn.vo.PostReviewVo;
import com.bcqn.vo.PostReviewVos;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * PostReviewService
 *
 * @author Kelly
 * @version v1.0
 * @date 2020/4/17 21:29
 */
public interface PostReviewService {
    /**
     * 帖子评论
     * @param postReview
     * @return
     */
    int update(PostReview postReview);

    /**
     * 删除帖子评论
     * @param reviewId
     * @param userId
     * @return
     */
    int delete(Long reviewId, Long userId);

    /**
     * 评论的点赞或者取消点赞
     * @param reviewId
     * @param userId
     * @param likeStatus
     * @return
     */
    int updateLike(Long reviewId, Long userId, Integer likeStatus);

    /**
     * 根据帖子的id查询评论
     * @param postId
     * @return
     */
    PageInfo<PostReviewVo> getByPostId(Long postId, Long userId,Integer orderType, Integer PageNum, Integer PageSize);

    /**
     * 根据评论id查询子评论
     * @param id
     * @param PageNum
     * @param PageSize
     * @return
     */
    List<PostReviewVo> getById(Long id,  Long userId, int PageNum, int PageSize);

    /**
     * 批量更新评论点赞信息
     * @param map
     * @return
     */
    int batchUpdatePostReviewLike(Map<Long, Integer> map);
}
